package qnb._common;

import java.io.FileOutputStream;
import java.io.IOException;

import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;

public class CreateDateCells {
	public static void main(String[] args) throws IOException {
		try (HSSFWorkbook wb = new HSSFWorkbook()) {
			
			HSSFSheet sheet = wb.createSheet("值日表");
			HSSFRow row = sheet.createRow(0);//第1行
			
			HSSFCell cell = row.createCell(0);
			cell.setCellValue("ABC");
			cell = row.createCell(1);
			cell.setCellValue("EEE");
			cell = row.createCell(2);
			cell.setCellValue("CCC");
			
			
			row = sheet.createRow(1);//第2行
			cell = row.createCell(0);
			cell.setCellValue("1");
			cell = row.createCell(1);
			cell.setCellValue("2");
			cell = row.createCell(2);
			cell.setCellValue("3");
			
			try (FileOutputStream fileOut = new FileOutputStream("D:\\tmp\\131.xls")) {
				wb.write(fileOut);
			}
		}
	}
}
